//
//  AppsFlyerProxy.h
//  os-usrsrc_Example
//
//  Created by neil on 2019/7/15.
//  Copyright © 2019 neil. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EventName.h"

@protocol AppsFlyerConversionListener <NSObject>

@optional
- (void)onAppsFlayerReturnIsBuyFb:(BOOL)isBuyFb;

- (void) onAppsFlyerReturnSuccess:(NSDictionary<NSString*, NSString*> *_Nullable)map;

- (void) onAppsFlyerReturnFailure:(NSString*_Nullable)failure;


/**
 自然用户和非自然用户的回调

 @param status 自然0 非自然 1
 */
- (void) onAppsFlyerReturnStatus:(int)status;

- (void) onAppsFlyerReturnAdSet:(NSString*_Nullable)adSet;


@end


@interface AppsFlyerProxy : NSObject

+ (instancetype _Nonnull )getInstance;

+ (void)instanceInitWithKey:(NSString *_Nonnull)key
   appId:(NSString *_Nonnull)appId
         gameName:(NSString *_Nonnull)gameName
                   delegate:(id<AppsFlyerConversionListener>_Nonnull)delegate;

+ (void)applicationDidBecomeActive;

+ (void)logEvent:(NSString *_Nonnull)eventName;

+ (void)logEvent:(NSString *_Nonnull)eventName json:(NSString *_Nullable)json;

+ (void)logEvent:(NSString *_Nonnull)eventName dict:(NSDictionary *_Nullable)dict;
+ (NSString *_Nonnull)getEventName:(NSString *_Nonnull)eventName;

@end

